import request from '@/utils/request'

// 获取-所有部门列表
export function getDepartmentsListAPI() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 获取-员工简单列表
export function getEmployeeSimpleListAPI() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}
// 新增-组织部门
export function createDepartmentsAPI(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 根据ID查询部门详情
export function inquDeparDetailsAPI(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
// 根据ID修改部门详情
export function updateDeparDetailsAPI(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
// 根据ID删除部门
export function deleteDeparDetailsAPI(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
